<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="./css/spop.min.css">
    <title>Document</title>
</head>
<body>
    
    <script src="./js/spop.min.js"></script>
    <script>

        for(var i =0; i<8; i++){
            (function(i){
                setTimeout(function(){
                    spop({
                        template: '<a href="http://www.baidu.com" target="_blank" style="text-decoration:none;">message'+i+'</a>',
                        position: "bottom-right",
                        onClose: function(){
                            console.log(i)
                        }
                    })
                }, i*1000)
            })(i)
        }
        
        // spop('Default SmallPop');
    </script>
</body>
</html>